Repository navigation
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@bors r+ rollup |
…ns, r=Mark-Simulacrum Avoid redundant scans when extracting stage0 archives [`getnames()`](https://github.com/python/cpython/blob/b4e48a444ea02921ce4b701fe165e6cfd4cf5845/Lib/tarfile.py#L1991-L1995) calls [`getmembers()`](https://github.com/python/cpython/blob/b4e48a444ea02921ce4b701fe165e6cfd4cf5845/Lib/tarfile.py#L1981-L1989), which can scan the entire archive if its members have not already been loaded. Iterating over tar directly (https://github.com/python/cpython/blob/v3.10.12/Lib/tarfile.py#L2715-L2747) allows archive entries to be handled one at a time. Passing each `TarInfo` directly to [`extract()`](https://docs.python.org/3.10/library/tarfile.html#tarfile.TarFile.extract) also avoids name-based lookup, removing the preliminary scan and its associated repeated decompression. With cached stage0 archives, `RustBuild.download_toolchain()` improved from 6.44 s to 3.50 s (medians of two runs per version). The rustc, rust-std, and cargo archives were extracted in parallel into fresh directories. Output hashes were verified separately.
Rollup of 6 pull requests Successful merges: - #165778 (Bump stage0 to 1.101.0-beta.1) - #163077 (feat: support nested functions with `#[offload_kernel]`) - #165578 (Avoid `Hash::hash` when stable-hashing various types) - #165729 (tests: Add regression test for infinite recursive dereference) - #165819 (Avoid redundant scans when extracting stage0 archives) - #165822 (Remove unused compiler modules and types)
…ns, r=Mark-Simulacrum Avoid redundant scans when extracting stage0 archives [`getnames()`](https://github.com/python/cpython/blob/b4e48a444ea02921ce4b701fe165e6cfd4cf5845/Lib/tarfile.py#L1991-L1995) calls [`getmembers()`](https://github.com/python/cpython/blob/b4e48a444ea02921ce4b701fe165e6cfd4cf5845/Lib/tarfile.py#L1981-L1989), which can scan the entire archive if its members have not already been loaded. Iterating over tar directly (https://github.com/python/cpython/blob/v3.10.12/Lib/tarfile.py#L2715-L2747) allows archive entries to be handled one at a time. Passing each `TarInfo` directly to [`extract()`](https://docs.python.org/3.10/library/tarfile.html#tarfile.TarFile.extract) also avoids name-based lookup, removing the preliminary scan and its associated repeated decompression. With cached stage0 archives, `RustBuild.download_toolchain()` improved from 6.44 s to 3.50 s (medians of two runs per version). The rustc, rust-std, and cargo archives were extracted in parallel into fresh directories. Output hashes were verified separately.
Rollup of 12 pull requests Successful merges: - #165804 (cg_llvm: Use an invariant lifetime brand for LLVM values) - #165778 (Bump stage0 to 1.101.0-beta.1) - #165412 (Implement `core::ops::FnAddr`) - #165487 (Migrate built-in macros `pattern_type` & `view_type` to macros 2.0 that expand to internal syntax) - #165818 (do not lint `redundant_lifetimes` on items from external macros) - #163077 (feat: support nested functions with `#[offload_kernel]`) - #164795 (Extend support of lint `explicit_outlives_requirements` to checked type aliases) - #165578 (Avoid `Hash::hash` when stable-hashing various types) - #165729 (tests: Add regression test for infinite recursive dereference) - #165819 (Avoid redundant scans when extracting stage0 archives) - #165822 (Remove unused compiler modules and types) - #165824 (Add regression test for HRTB projection bound with TryFrom error)
|
|
This pull request was unapproved. This PR was contained in a rollup (#165843), which was unapproved. |
This comment has been minimized.
This comment has been minimized.
Avoid redundant scans when extracting stage0 archives try-job: dist-x86_64-msvc
|
Looks like the CI failure was probably unrelated flakiness, though I'm marking this as iffy in case this PR is the cause of the flakiness. @bors r=Mark-Simulacrum rollup=iffy |
|
@bors r- |
|
This pull request was unapproved. |
|
This PR does not appear to have introduced the underlying race condition. However, the change in extraction timing may have exposed an existing intermittent failure. I will check it. |
ce09ca6 to
832e0f3
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
|
@bors try jobs=dist-x86_64-msvc |
|
⌛ Trying commit 832e0f3 with merge b06d48c… To cancel the try build, run the command Workflow: https://github.com/rust-lang/rust/actions/runs/43185061034 |
Avoid redundant scans when extracting stage0 archives try-job: dist-x86_64-msvc
getnames()callsgetmembers(), which can scan the entire archive if its members have not already been loaded. Iterating over tar directly (https://github.com/python/cpython/blob/v3.10.12/Lib/tarfile.py#L2715-L2747) allows archive entries to be handled one at a time. Passing eachTarInfodirectly toextract()also avoids name-based lookup, removing the preliminary scan and its associated repeated decompression.With cached stage0 archives,
RustBuild.download_toolchain()improved from 6.44 s to 3.50 s (medians of two runs per version). The rustc, rust-std, and cargo archives were extracted in parallel into fresh directories. Output hashes were verified separately.